From: Juri Linkov Date: Thu, 10 Dec 2020 08:28:32 +0000 (+0200) Subject: Allow creating a new tab from the minibuffer (bug#45072) X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~18^2~5050 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=91432f1ec55e125541d5e206402a72dfdef88ed8;p=emacs.git Allow creating a new tab from the minibuffer (bug#45072) * lisp/tab-bar.el (tab-bar-new-tab-to): Select the original window when selected window is the minibuffer. --- diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 26049552242..1327bde9088 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -762,6 +762,8 @@ After the tab is created, the hooks in (from-tab (tab-bar--tab))) (when tab-bar-new-tab-choice + (when (minibuffer-selected-window) + (select-window (minibuffer-selected-window))) (delete-other-windows) ;; Create a new window to get rid of old window parameters ;; (e.g. prev/next buffers) of old window.